// 审批接口

import axios from '../axios'

// 获取审批类型
export const getApproveTypeApi = (data) => {
  return axios({
    url: '/tDescriptionFlow/findAll',
    method: 'get'
  })
}
// 创建审批列表
export const createApproveListApi = (data) => {
  return axios({
    url: '/tApproveFlow/findByUserId',
    method: 'get',
    params: data
  })
}

// 提交审批
export const postApplyApi = (data) => {
  return axios({
    url: '/tApproveFlow/apply',
    method: 'post',
    data
  })
}

export const getApprovalPersonApi = (data) => {
  return axios({
    url: '/tDescriptionFlow/findByTotal',
    method: 'get',
    params: data
  })
}

// 待我审批
export const getMyApproveList = (data) => {
  return axios({
    url: '/tApproveFlow/findByApprove',
    method: 'get',
    params: data
  })
}

// 审批一个接口
export const posTratifyApi = (data) => {
  return axios({
    url: '/tApproveFlow/ratify',
    method: 'post',
    data
  })
}
